/*
package com.atguigu.day13.teacher.homework01;

import java.util.Comparator;
//todo 按照编号从高到低
public class SortEmployeeByIdDesc implements Comparator<Employee> {
@Override
    public int compare(Employee o1, Employee o2) {
        return -(o1.getId()-o2.getId());
    }

}

//todo 按照薪资从低到高
class SortEmployeeBySalary
 implements Comparator<Employee>
{

@Override
    public int compare(Employee o1, Employee o2) {
        if(o1.getSalary()>o2.getSalary()){
            return 1;
        }else if(o1.getSalary()<o2.getSalary()){
            return -1;
        }
        return 0;
    }

}

class SortEmployeeByAgeDesc
 implements Comparator<Employee>
{


@Override
    public int compare(Employee o1, Employee o2) {
        return -(o1.getAge()-o2.getAge());
    }

}
*/
